package sumoTween.demo.swing.animatedSimple;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import javax.swing.JComponent;

import sumoTween.KeyFloat;
import sumoTween.Tweener;
import sumoTween.easing.Back;
import sumoTween.easing.Bounce;
import sumoTween.easing.Circ;
import sumoTween.easing.Cubic;
import sumoTween.easing.EasingIF;
import sumoTween.easing.Expo;
import sumoTween.easing.Linear;
import sumoTween.easing.Quad;
import sumoTween.easing.Quart;
import sumoTween.easing.Quint;
import sumoTween.easing.Sine;
import sumoTween.events.KeyEvent;

public class DemoComponent extends JComponent 
{
	Tweener testTween=new Tweener();
	Font font;
	int currentEasing=0;
	
	public DemoComponent()
	{
		font=new Font("Arial", Font.PLAIN,10);
		init();
	}

	
	void init()
	{
		testTween=new Tweener();
		testTween.setEasing(new Cubic());
		testTween.set(0, 10f, Tweener.EASING_IN);
		testTween.set(1, 100f, Tweener.EASING_OUT);
		testTween.set(2, 10f);
	}
	
	public void paint(Graphics g)
	{
		g.setFont(font);
		g.setColor(Color.white);
		g.fillRect(0, 0, getWidth(), getHeight());

		g.setColor(Color.black);
		
		g.fillRect(60,testTween.getIntValue(), 10, 10);
	}


}






